home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Games
/
Chess
/
Source
/
ResponseMeter.m
< prev
next >
Wrap
Text File
|
1994-04-01
|
770b
|
53 lines
#import <appkit/appkit.h>
#import "ResponseMeter.h"
#import "gnuchess.h"
@implementation ResponseMeter
- displayFilled
{
[self lockFocus];
PSgsave();
PSsetgray( NX_WHITE );
PSclippath();
PSfill();
PSsetlinewidth( 2.0 );
PSsetgray( NX_BLACK );
PSclippath();
PSstroke();
PSgrestore();
PSflushgraphics();
NXPing();
[self unlockFocus];
}
- drawSelf:(const NXRect *)f :(int)rectCount
{
PSgsave();
PSsetgray( 0.5 );
PSclippath();
PSfill();
if( (ResponseTime+ExtraTime) ){
PSsetgray( NX_WHITE );
PSrectfill( 0.0, 0.0,
et*(f->size.width/(ResponseTime+ExtraTime)), f->size.height );
}
PSsetlinewidth( 2.0 );
PSsetgray( NX_BLACK );
PSclippath();
PSstroke();
PSgrestore();
}
@end